load(
    "//tools/skylark:drake_cc.bzl",
    "drake_cc_googletest",
)
load("//tools/skylark:drake_data.bzl", "models_filegroup")
load("//tools/install:install_data.bzl", "install_data")
load("//tools/lint:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])

models_filegroup(
    name = "glob_models",
    extra_srcs = [
        "LICENSE.TXT",
        "README.md",
    ],
    visibility = ["//visibility:private"],
)

install_data(
    name = "install_data",
    data = [":glob_models"],
)

filegroup(
    name = "models",
    srcs = [
        ":glob_models",
        "@drake_models//:franka_description/meshes/visual/finger.mtl",
        "@drake_models//:franka_description/meshes/visual/finger.obj",
        "@drake_models//:franka_description/meshes/visual/hand.mtl",
        "@drake_models//:franka_description/meshes/visual/hand.obj",
        "@drake_models//:franka_description/meshes/visual/link0.mtl",
        "@drake_models//:franka_description/meshes/visual/link0.obj",
        "@drake_models//:franka_description/meshes/visual/link1.mtl",
        "@drake_models//:franka_description/meshes/visual/link1.obj",
        "@drake_models//:franka_description/meshes/visual/link2.mtl",
        "@drake_models//:franka_description/meshes/visual/link2.obj",
        "@drake_models//:franka_description/meshes/visual/link3.mtl",
        "@drake_models//:franka_description/meshes/visual/link3.obj",
        "@drake_models//:franka_description/meshes/visual/link4.mtl",
        "@drake_models//:franka_description/meshes/visual/link4.obj",
        "@drake_models//:franka_description/meshes/visual/link5.mtl",
        "@drake_models//:franka_description/meshes/visual/link5.obj",
        "@drake_models//:franka_description/meshes/visual/link6.mtl",
        "@drake_models//:franka_description/meshes/visual/link6.obj",
        "@drake_models//:franka_description/meshes/visual/link7.mtl",
        "@drake_models//:franka_description/meshes/visual/link7.obj",
    ],
)

# === test/ ===

drake_cc_googletest(
    name = "franka_arm_test",
    srcs = ["urdf/test/franka_arm_test.cc"],
    data = [":models"],
    deps = [
        "//common:find_resource",
        "//common/test_utilities:eigen_matrix_compare",
        "//multibody/parsing",
        "//multibody/plant",
    ],
)

add_lint_tests()
